Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding efficiency vs production radius to output root files (Revision of PR #3539) #3981

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

delitez
Copy link
Contributor

@delitez delitez commented Dec 12, 2024

This PR is the revised version of the work of @AichaMattouhi (#3539). Efficiency vs production radius plot is added to the performance and track summary root output files.

Summary by CodeRabbit

  • New Features

    • Added support for tracking efficiency related to the production radius in the efficiency plot tool.
    • Introduced a new vector to store production radius data for the majority particle in the track summary writer.
    • Enhanced the ROOT tree to include transverse production radius data for processed tracks.
    • Added a new histogram configuration for tracking the production radius.
  • Bug Fixes

    • Improved memory management by ensuring proper deletion of newly added histograms.
  • Documentation

    • Updated comments to clarify the purpose of new variables related to production radius.
  • Chores

    • Adjusted vertex generation parameters in the simulation script for better distribution of generated vertices.
    • Updated hash values for various test files to reflect content changes.

Copy link

coderabbitai bot commented Dec 12, 2024

Walkthrough

Enhancements to the EffPlotTool class and related components made, they have been. A new variable for production radius tracking added to the EffPlotTool, including modifications to the Config and EffPlotCache structs. A vector for storing production radius data now includes the RootTrackSummaryWriter class. Additionally, changes in the full_chain_odd_LRT.py script adjust parameters for vertex generation. Collectively, improve the functionality and data tracking capabilities within the framework, these updates do.

Changes

File Change Summary
Examples/Framework/include/ActsExamples/Validation/EffPlotTool.hpp - Added TEfficiency* trackEff_vs_prodR{nullptr}; in EffPlotCache struct.
- Updated varBinning in Config struct to include {"prodR", PlotHelpers::Binning("prod_R [mm]", 100, 0, 200)}.
Examples/Framework/src/Validation/EffPlotTool.cpp - Added bProdR and trackEff_vs_prodR in book method.
- Introduced t_prodR in fill method for production radius calculation.
Examples/Io/Root/include/ActsExamples/Io/Root/RootTrackSummaryWriter.hpp - Added std::vector<float> m_t_prodR; in RootTrackSummaryWriter class.
Examples/Io/Root/src/RootTrackSummaryWriter.cpp - Added float t_prodR and updated writeT method to calculate and store production radius.
Examples/Scripts/Python/full_chain_odd_LRT.py - Modified parameters rMean to 50 and rStdDev to 50 * u.mm in GaussianDisplacedVertexPositionGenerator.
Examples/Python/tests/root_file_hashes.txt - Updated hash values for various test files to reflect changes.
CI/physmon/config/tracksummary_ckf.yml - Added new histogram t_prodR with parameters nbins: 100, min: 0, max: 200.

Possibly related PRs

Suggested labels

Component - Core, automerge, Track Finding

Suggested reviewers

  • paulgessinger

In the code, new paths emerge,
With production radius, we now surge.
Histograms and vectors, oh what a sight,
Efficiency tracking, taking flight!
Through scripts and tools, enhancements flow,
A brighter future, together we grow! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9f0553 and 6cb585d.

📒 Files selected for processing (1)
  • CI/physmon/config/tracksummary_ckf.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CI/physmon/config/tracksummary_ckf.yml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Dec 12, 2024
@github-actions github-actions bot added this to the next milestone Dec 12, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Examples/Io/Root/src/RootTrackSummaryWriter.cpp (1)

115-115: Consistent with the codebase patterns, your changes are!

Follow the established patterns for branch creation, variable initialization, computation, and vector operations, your implementation does. Harmoniously integrated with existing code structure, these changes are.

Consider documenting the physical meaning of production radius in a comment, help future maintainers it will.

Also applies to: 303-303, 344-344, 396-396, 582-582

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0487060 and 10f2db5.

📒 Files selected for processing (3)
  • Examples/Framework/include/ActsExamples/Validation/EffPlotTool.hpp (2 hunks)
  • Examples/Framework/src/Validation/EffPlotTool.cpp (5 hunks)
  • Examples/Io/Root/src/RootTrackSummaryWriter.cpp (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Examples/Framework/include/ActsExamples/Validation/EffPlotTool.hpp
  • Examples/Framework/src/Validation/EffPlotTool.cpp
🔇 Additional comments (1)
Examples/Io/Root/src/RootTrackSummaryWriter.cpp (1)

344-344: Correct, the calculation of production radius is!

Using Euclidean distance in XY plane, proper it is. Clear and efficient implementation, you have created.

Copy link

github-actions bot commented Dec 12, 2024

📊: Physics performance monitoring for e9f0553

Full contents

physmon summary

paulgessinger
paulgessinger previously approved these changes Dec 13, 2024
@paulgessinger
Copy link
Member

Output changes are expected, the references will need to be updated.

@github-actions github-actions bot added Infrastructure Changes to build tools, continous integration, ... Changes Performance labels Jan 9, 2025
paulgessinger
paulgessinger previously approved these changes Jan 9, 2025
@paulgessinger
Copy link
Member

Ah, one thing I realized just now is that the auto-plotter currently does not get a fixed range configured in tracksummary_ckf.yml. This can lead to failing comparisons if the axis range that is otherwise automatically determined changes at all.

Could you fix the range to some empirical value so that it includes a reasonable range in R?

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f8d9c1 and e9f0553.

📒 Files selected for processing (2)
  • CI/physmon/config/tracksummary_ckf.yml (1 hunks)
  • Examples/Python/tests/root_file_hashes.txt (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Examples/Python/tests/root_file_hashes.txt
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: linux_ubuntu_extra (ubuntu2204_clang, 20)
  • GitHub Check: macos
  • GitHub Check: linux_ubuntu_extra (ubuntu2204, 20)
  • GitHub Check: linux_ubuntu
  • GitHub Check: missing_includes
  • GitHub Check: build_debug
🔇 Additional comments (1)
CI/physmon/config/tracksummary_ckf.yml (1)

168-172: Pleased with the structure, I am.

Well-organized and consistent with other histogram configurations, this addition is. In harmony with the Force of YAML formatting, it stands.

CI/physmon/config/tracksummary_ckf.yml Outdated Show resolved Hide resolved
Copy link

@paulgessinger
Copy link
Member

@delitez I'm afraid at least one reference file was changed on main in the meantime. Can you update this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes Performance Component - Examples Affects the Examples module Infrastructure Changes to build tools, continous integration, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants